<?php
Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js/user/user.js');
Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js/jquery-ui.js');
Yii::app()->clientScript->registerCssFile(Yii::app()->baseUrl . '/css/jquery-ui.css');
Yii::app()->clientScript->registerCssFile(Yii::app()->baseUrl . '/css/user/user.css');

$this->pageTitle = Yii::app()->name . ' - Login';
$this->breadcrumbs = array(
    'Login',
);
?>

<div class="image-loader">
   
</div>
<?php
    foreach(Yii::app()->user->getFlashes() as $key => $message) {
        echo '<div class="alert in alert-block fade alert-error">' . $message . "</div>\n";
    }
?>

<div class="alert in alert-block fade alert-success" style="display: none;">
     '<strong>Well done!</strong> You will receive the E-mail.
</div>

<div class="alert in alert-block fade alert-error" style="display: none;">
    '<strong> Invalid E-mail Address.</strong>
</div>

<h1>Login</h1>

<p>Please fill out the following form with your login credentials:</p>

<div class="form">

    <?php
    $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
        'id' => 'login-form',
        'type' => 'horizontal',
        'enableClientValidation' => true,
        'clientOptions' => array(
            'validateOnSubmit' => true,
        ),
            ));
    ?>

    <p class="note">Fields with <span class="required">*</span> are required.</p>

    <?php echo $form->textFieldRow($model, 'username'); ?>

    <?php echo $form->passwordFieldRow($model, 'password'); ?>

    <?php echo CHtml::link('Forgot Password', array('#'), array('class' => 'update_psw')); ?>

    <div class="form-actions">
        <?php
        $this->widget('bootstrap.widgets.TbButton', array(
            'buttonType' => 'submit',
            'type' => 'primary',
            'label' => 'Login',
        ));
        ?>
    </div>

    <?php $this->endWidget(); ?>

</div><!-- form -->


<div id="dialog-form" title="Fogot Password form">
    <p class="validateTips"></p>
   
    <fieldset>
        <?php
        echo Chtml::label('Enter your Email Address', '', array('wrapInput' => true));
        echo Chtml::textField('email', '', array('id' => "email", 'class' => "text ui-widget-content ui-corner-all"));
        ?>

    </fieldset>

</div>

